<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
</head>
<body>
    <form id="student-add-form" class="form-horizontal">
        <div>
            <p class="bg-primary">注意：年级格式为 2019；班级格式为 1班 2班</p>
        </div>
        <div class="form-group">
            <label for="code" class="col-sm-2 control-label">学号</label>
            <div class="col-sm-10">
                <input disabled th:value="${student.code}" type="text" class="form-control" id="code" />
            </div>
        </div>
        <div class="form-group">
            <label for="sname" class="col-sm-2 control-label">姓名</label>
            <div class="col-sm-10">
                <input disabled th:value="${student.sname}" type="text" class="form-control" id="sname" />
            </div>
        </div>

        <div class="form-group">
            <label for="grade" class="col-sm-2 control-label">学年</label>
            <div class="col-sm-10">
                <input th:value="${student.grade}" type="text" class="form-control" id="grade" />
            </div>
        </div>
        <div class="form-group">
            <label for="major" class="col-sm-2 control-label">专业</label>
            <div class="col-sm-10">
                <input th:value="${student.major}" type="text" list="student-major" class="form-control" id="major" />
                <datalist  id="student-major">
                    <option th:each="major:${studentMajor}" th:text="${major}" th:value="${major}"></option>
                </datalist>
            </div>
        </div>
        <div class="form-group">
            <label for="class_no" class="col-sm-2 control-label">班级</label>
            <div class="col-sm-10">
                <input th:value="${student.class_no}" type="text" class="form-control" id="class_no" />
            </div>
        </div>
    </form>
</body>
</html>